<!doctype html>
<html>

<head>
  <!-- css文件 -->
  {include file="public/title" /}
</head>

<body data-type="generalComponents">
  <!-- 头部 -->
  {include file="public/header" /}
  <div class="tpl-page-container tpl-page-header-fixed">
    <!-- 左侧导航 -->
    {include file="public/leftNav" /}
    <div class="tpl-content-wrapper">
      <ol class="am-breadcrumb">
        <li><a href="#" class="am-icon-home">首页</a></li>
        <li><a href="#">管理员</a></li>
        <li class="am-active">权限添加</li>
      </ol>
      <div class="tpl-portlet-components">
        <div class="tpl-block">
          <div class="am-g tpl-amazeui-form">
            <div class="am-u-sm-12 am-u-md-9">
              <form class="am-form am-form-horizontal" method="post" action="">
                <div class="am-form-group">
                  <label for="user-name" class="am-u-sm-3 am-form-label">上级权限</label>
                  <div class="am-u-sm-9">
                    <select name="pid" data-am-selected="{searchBox: 1}" >
                      <option value="0">-顶级权限</option>
                      {foreach $AuthRule as $vo}
                        <option value="{$vo.id}"><?php if($vo['level'] != 0){ echo '|';} echo str_repeat('-',$vo['level']*3);?>{$vo.title}</option>
                      {/foreach}
                    </select>
                  </div>
                </div>
                <div class="am-form-group">
                  <label for="user-mima" class="am-u-sm-3 am-form-label">权限名称</label>
                  <div class="am-u-sm-9">
                    <input type="text" name="title" required oninvalid="setCustomValidity('请输入权限名称');" oninput="setCustomValidity('');" id="user-name" placeholder="权限名称">
                  </div>
                </div>
                <div class="am-form-group">
                  <label for="user-intro" class="am-u-sm-3 am-form-label">控制器/方法</label>
                  <div class="am-u-sm-9">
                    <input type="text" name="name" required oninvalid="setCustomValidity('请输入控制器/方法');" oninput="setCustomValidity('');" id="user-name" placeholder="控制器/方法">
                  </div>
                </div>
                <div class="am-form-group">
                  <div class="am-u-sm-9 am-u-sm-push-3">
                    <button type="submit" class="am-btn am-btn-primary">添加</button>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- js -->
  {include file="public/foot" /}
</body>
</html>